//
// Created by xzy.xiao on 2022/6/8.
//

#ifndef QT_DEMO_FINDDIALOG_H
#define QT_DEMO_FINDDIALOG_H

#include <QDialog>

class QCheckBox;
class QLabel;
class QLineEdit;
class QPushButton;

/**
 * 搜索对话框
 */
class FindDialog : public QDialog {
Q_OBJECT

public:
    FindDialog(QWidget *parent = 0);

    ~FindDialog();

signals:

    void findNext(const QString &str, Qt::CaseSensitivity cs);

    void findPrevious(const QString &str, Qt::CaseSensitivity cs);

private slots:

    void findClicked();

    void enableFindButton(const QString &text);

private:
    QLabel *label;
    QLineEdit *lineEdit;
    QCheckBox *caseCheckBox;
    QCheckBox *backwardCheckBox;
    QPushButton *findButton;
    QPushButton *closeButton;
};

#endif //QT_DEMO_FINDDIALOG_H
